Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HTML5 element id #801

Closed
wants to merge 1 commit into from
Closed

Support HTML5 element id #801

wants to merge 1 commit into from

Conversation

Dafrok
Copy link

@Dafrok Dafrok commented Aug 31, 2016

In HTML5, you can take any unicode and use them as values for id
attributes. It’s important for non-english languages. For example:

# 蛤蛤

will be complied by this lib into:

<h1 id="-">蛤蛤</h1>

however, the majority of us want it to be:

<h1 id="蛤蛤">蛤蛤</h1>

In HTML5, you can take any unicode and use them as values for id
attributes.
@BOT-Man-JL
Copy link

I suppose overriding renderer.heading method and using Unicode filter will help (walk around)

raw.toLowerCase().replace(/[^\w\u4E00-\u9FFF]+/g, '-');

Ref: https://en.wikipedia.org/wiki/CJK_Unified_Ideographs

@joshbruce
Copy link
Member

Closing due to merge conflicts and not necessarily the focus at this time - flagging with #981 for future reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants